//
//  TextFieldViewController.m
//  TextField
//

#import "TextFieldViewController.h"

@implementation TextFieldViewController

- (void)viewDidLoad {
    [super viewDidLoad];

	// UITextBorderStyleNone
	
	CGRect labelRect = CGRectMake(10, 10, 300, 20);
	UILabel *myLabel = [[UILabel alloc] initWithFrame:labelRect];
	[myLabel setText:@"UITextBorderStyleNone"];
	[myLabel setBackgroundColor:[UIColor clearColor]];
	[self.view addSubview:myLabel];
	[myLabel release];
	
	CGRect textRect = CGRectMake(10, 40, 300, 26);
	UITextField *myTextField = [[UITextField alloc] initWithFrame:textRect];
	myTextField.backgroundColor = [UIColor whiteColor];
	myTextField.borderStyle = UITextBorderStyleNone;
	[self.view addSubview:myTextField];
	[myTextField release];
	
	// UITextBorderStyleLine
	
	labelRect = CGRectMake(10, 80, 300, 20);
	myLabel = [[UILabel alloc] initWithFrame:labelRect];
	[myLabel setText:@"UITextBorderStyleLine"];
	[myLabel setBackgroundColor:[UIColor clearColor]];
	[self.view addSubview:myLabel];
	[myLabel release];
	
	textRect = CGRectMake(10, 110, 300, 26);
	myTextField = [[UITextField alloc] initWithFrame:textRect];
	myTextField.backgroundColor = [UIColor whiteColor];
	myTextField.borderStyle = UITextBorderStyleLine;
	[self.view addSubview:myTextField];
	[myTextField release];
	
	// UITextBorderStyleBezel
	
	labelRect = CGRectMake(10, 150, 300, 20);
	myLabel = [[UILabel alloc] initWithFrame:labelRect];
	[myLabel setText:@"UITextBorderStyleBezel"];
	[myLabel setBackgroundColor:[UIColor clearColor]];
	[self.view addSubview:myLabel];
	[myLabel release];
	
	textRect = CGRectMake(10, 180, 300, 26);
	myTextField = [[UITextField alloc] initWithFrame:textRect];
	myTextField.backgroundColor = [UIColor whiteColor];
	myTextField.borderStyle = UITextBorderStyleBezel;
	[self.view addSubview:myTextField];
	[myTextField release];
	
	// UITextBorderStyleRoundedRect
	
	labelRect = CGRectMake(10, 220, 300, 20);
	myLabel = [[UILabel alloc] initWithFrame:labelRect];
	[myLabel setText:@"UITextBorderStyleLine"];
	[myLabel setBackgroundColor:[UIColor clearColor]];
	[self.view addSubview:myLabel];
	[myLabel release];
	
	textRect = CGRectMake(10, 250, 300, 26);
	myTextField = [[UITextField alloc] initWithFrame:textRect];
	myTextField.backgroundColor = [UIColor clearColor];
	myTextField.borderStyle = UITextBorderStyleRoundedRect;
	[self.view addSubview:myTextField];
	[myTextField release];
}

- (void)dealloc {
    [super dealloc];
}

@end
